home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 957 b | 49 lines | [TEXT/CWIE] |
- // EventQueue.h
-
- #ifndef EventQueue_h
- #define EventQueue_h
-
- #ifndef Integers_h
- #include "Integers.h"
- #endif
- #ifndef EventManagerUser_h
- #include "EventManagerUser.h"
- #endif
- #ifndef Assert_h
- #include "Assert.h"
- #endif
- #ifndef FiniteQueue_h
- #include "FiniteQueue.h"
- #endif
-
- class EventQueue: public EventManagerUser
- {
- private:
- FiniteQueue< EventRecord, 2 > events;
- EventRecord *previous;
- EventRecord *current;
- EventRecord *next;
-
- EventQueue();
-
- static bool Valid( const EventRecord& );
- static bool Exists( WindowPeek );
-
- void Advance();
-
- public:
- static EventQueue& The();
-
- const EventRecord& operator*() const { Assert( current != 0 ); return *current; }
- const EventRecord *operator->() const { Assert( current != 0 ); return current; }
-
- void operator++();
- void operator++(int) { operator++(); }
- void AdvanceWithoutWaiting();
-
- void operator--();
- void operator--(int) { operator--(); }
- };
-
- #endif
-